package org.budo.support.spring.context.support;

import java.io.IOException;
import java.util.Properties;

import org.budo.support.slf4j.Slf4j;
import org.slf4j.Logger;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.env.ConfigurablePropertyResolver;
import org.springframework.core.io.Resource;

/**
 * @author limingwei
 */
public class BudoPropertySourcesPlaceholderConfigurer extends PropertySourcesPlaceholderConfigurer {
    private static final Logger log = Slf4j.getLogger();

    public void setLocation(Resource location) {
        log.info("location={}", location);

        super.setLocation(location);
    }

    protected void loadProperties(Properties props) throws IOException {
        super.loadProperties(props);
    }

    protected Properties mergeProperties() throws IOException {
        return super.mergeProperties();
    }

    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
        super.postProcessBeanFactory(beanFactory);
    }

    protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, ConfigurablePropertyResolver propertyResolver) throws BeansException {
        super.processProperties(beanFactoryToProcess, propertyResolver);
    }
}